using SqlSugar;
using System.ComponentModel.DataAnnotations;
namespace Jst.Domain
{
    [SugarTable("Role", TableDescription = "角色表")]
    public partial class Role
    {
        /// <summary>
        /// Id
        /// </summary>
        [Display(Name = "Id")]
        [SugarColumn(ColumnDescription = "Id", IsNullable = false, IsPrimaryKey = true, IsIdentity = false)]
        [Required(ErrorMessage = "请输入{0}")]
        public long Id { get; set; }

        /// <summary>
        /// 获取或设置是否禁用，逻辑上的删除，非物理删除
        /// </summary>
        [Display(Name = "获取或设置是否禁用，逻辑上的删除，非物理删除")]
        [SugarColumn(ColumnDescription = "获取或设置是否禁用，逻辑上的删除，非物理删除", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [Required(ErrorMessage = "请输入{0}")]
        public bool IsDeleted { get; set; }

        /// <summary>
        /// 角色名
        /// </summary>
        [Display(Name = "角色名")]
        [SugarColumn(ColumnDescription = "角色名", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [StringLength(50, ErrorMessage = "【{0}】不能超过{1}字符长度")]
        public string Name { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        [Display(Name = "描述")]
        [SugarColumn(ColumnDescription = "描述", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [StringLength(100, ErrorMessage = "【{0}】不能超过{1}字符长度")]
        public string Description { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        [Display(Name = "排序")]
        [SugarColumn(ColumnDescription = "排序", IsNullable = false, IsPrimaryKey = false, IsIdentity = false)]
        [Required(ErrorMessage = "请输入{0}")]
        public int OrderSort { get; set; }

        /// <summary>
        /// 自定义权限的部门ids
        /// </summary>
        [Display(Name = "自定义权限的部门ids")]
        [SugarColumn(ColumnDescription = "自定义权限的部门ids", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [StringLength(500, ErrorMessage = "【{0}】不能超过{1}字符长度")]
        public string Dids { get; set; }

        /// <summary>
        /// 权限范围 -1 无任何权限；1 自定义权限；2 本部门；3 本部门及以下；4 仅自己；9 全部；
        /// </summary>
        [Display(Name = "权限范围-1 无任何权限；1 自定义权限；2 本部门；3 本部门及以下；4 仅自己；9 全部；")]
        [SugarColumn(ColumnDescription = "权限范围-1 无任何权限；1 自定义权限；2 本部门；3 本部门及以下；4 仅自己；9 全部；", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [Required(ErrorMessage = "请输入{0}")]
        public int AuthorityScope { get; set; }

        /// <summary>
        /// 是否激活
        /// </summary>
        [Display(Name = "是否激活")]
        [SugarColumn(ColumnDescription = "是否激活", IsNullable = false, IsPrimaryKey = false, IsIdentity = false)]
        [Required(ErrorMessage = "请输入{0}")]
        public bool Enabled { get; set; }

        /// <summary>
        /// 创建ID
        /// </summary>
        [Display(Name = "创建ID")]
        [SugarColumn(ColumnDescription = "创建ID", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [Required(ErrorMessage = "请输入{0}")]
        public long CreateId { get; set; }

        /// <summary>
        /// 创建者
        /// </summary>
        [Display(Name = "创建者")]
        [SugarColumn(ColumnDescription = "创建者", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [StringLength(50, ErrorMessage = "【{0}】不能超过{1}字符长度")]
        public string CreateBy { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Display(Name = "创建时间")]
        [SugarColumn(ColumnDescription = "创建时间", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [Required(ErrorMessage = "请输入{0}")]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 修改ID
        /// </summary>
        [Display(Name = "修改ID")]
        [SugarColumn(ColumnDescription = "修改ID", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [Required(ErrorMessage = "请输入{0}")]
        public long ModifyId { get; set; }

        /// <summary>
        /// 修改者
        /// </summary>
        [Display(Name = "修改者")]
        [SugarColumn(ColumnDescription = "修改者", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [StringLength(255, ErrorMessage = "【{0}】不能超过{1}字符长度")]
        public string ModifyBy { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        [Display(Name = "修改时间")]
        [SugarColumn(ColumnDescription = "修改时间", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [Required(ErrorMessage = "请输入{0}")]
        public DateTime ModifyTime { get; set; }

    }
}
